From: Jason Rumney Date: Wed, 27 Nov 2002 23:53:44 +0000 (+0000) Subject: (file-truename): Canonicalize non-existent names on w32. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~29490 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=2abdc063edb67401132d0414706047b0d82aab52;p=emacs.git (file-truename): Canonicalize non-existent names on w32. --- diff --git a/lisp/files.el b/lisp/files.el index 1a7d54b61a7..5de6559ae51 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -675,18 +675,17 @@ Do not specify them in other calls." ;; it is stored on disk (expanding short name aliases with the full ;; name in the process). (if (eq system-type 'windows-nt) - (let ((handler (find-file-name-handler filename 'file-truename)) - newname) + (let ((handler (find-file-name-handler filename 'file-truename))) ;; For file name that has a special handler, call handler. ;; This is so that ange-ftp can save time by doing a no-op. (if handler (setq filename (funcall handler 'file-truename filename)) ;; If filename contains a wildcard, newname will be the old name. - (if (string-match "[[*?]" filename) - (setq newname filename) - ;; If filename doesn't exist, newname will be nil. - (setq newname (w32-long-file-name filename))) - (setq filename (or newname filename))) + (unless (string-match "[[*?]" filename) + ;; If filename exists, use the long name, otherwise + ;; canonicalize the name, to handle case differences. + (setq filename (or (w32-long-file-name filename) + (untranslated-canonical-name filename))))) (setq done t))) ;; If this file directly leads to a link, process that iteratively